const Koa = require('koa')


// 实例化应用
const app = new Koa()

app.keys = ['signKey'] // 推荐使用随机字符串，必须写
// 中间件
app.use(async (ctx) => {
    const logged = ctx.cookies.get('logged', {signed: true})
    ctx.body = logged
})

app.listen(8890, () => {
    console.log('listen on 8899');
})